package com.sky.mapper.common;

import com.sky.pojo.DishFlavor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
    /**
     * 删除菜品关联的口味
     * @param ids
     */
    void deleteByDishId(List<Integer> ids);

    /**
     * 添加菜品口味
     * @param flavors
     */
    void add(List<DishFlavor> flavors);

    /**
     * 查询回显
     * @param id
     * @return
     */
    @Select("select * from dish_flavor where dish_id =#{id}")
    List<DishFlavor> getInfo(Integer id);
    @Select("select * from dish_flavor where dish_id=#{id}")
    List<DishFlavor> getByDishId(Long id);
}
